package com.bl.student.dao.model.custom;

import com.bl.student.common.enums.ArenaType;
import com.bl.student.common.enums.OnlineStatus;
import com.bl.student.dao.model.converter.DatetimeConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;

/**
 * Created by liangweikang on 18/4/28.
 */
@Data
@Entity
public class ArenaSearchEntity {
    @Id
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "图片")
    private String image;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "擂台编号")
    private String code;

    @ApiModelProperty(value = "简介")
    private String description;

    @ApiModelProperty(value = "权重")
    private int weight;

    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "擂台类型(ARENA 擂台 LIFE 生活)")
    private ArenaType type;

    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "用户状态")
    private OnlineStatus status;

    @ApiModelProperty(value = "创建者ID")
    @Column(name = "creator_id")
    private String creatorId;

    @ApiModelProperty(value = "详情ID")
    @Column(name = "detail_id")
    private String detailId;

    @ApiModelProperty(value = "开始时间")
    @Column(name = "start_time")
    @Convert(converter = DatetimeConverter.class)
    private Long startTime;

    @ApiModelProperty(value = "结束时间")
    @Column(name = "end_time")
    @Convert(converter = DatetimeConverter.class)
    private Long endTime;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    @Convert(converter = DatetimeConverter.class)
    private Long createTime;

    @ApiModelProperty(value = "修改时间")
    @Column(name = "update_time")
    @Convert(converter = DatetimeConverter.class)
    private Long updateTime;

    Integer collect;
}
